
package com.jf.cloud.api.delivery.feign;


import com.jf.cloud.api.delivery.vo.AreaVO;
import com.jf.cloud.common.feign.FeignInsideAuthConfig;
import com.jf.cloud.common.response.ServerResponseEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zz
 * @date 2021/06/02
 */
@FeignClient(value = "jfcloud-delivery",contextId ="area")
public interface AreaFeignClient {

    /**
     * 获取省信息列表
     * @return 省信息列表
     */
    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/area/listProvinceArea")
    ServerResponseEntity<List<AreaVO>> listProvinceArea();

    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/area/getArea")
    ServerResponseEntity<AreaVO> getArea(@RequestParam("areaId")  Long areaId);

    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/area/getAreaByName")
    ServerResponseEntity<AreaVO> getAreaByName(@RequestParam("areaName")  String areaName);

    @GetMapping(value = FeignInsideAuthConfig.FEIGN_URL_PREFIX + "/insider/area/listByPid")
    ServerResponseEntity<List<AreaVO>> listByPid(@RequestParam("pid")  Long pid);
}
